package com.ruoyi.project.yf.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.yf.mapper.YfStockNoticeMapper;
import com.ruoyi.project.yf.domain.YfStockNotice;
import com.ruoyi.project.yf.service.IYfStockNoticeService;

/**
 * 股票通知消息Service业务层处理
 * 
 * @author 云峰
 * @date 2020-06-15
 */
@Service
public class YfStockNoticeServiceImpl implements IYfStockNoticeService 
{
    @Autowired
    private YfStockNoticeMapper yfStockNoticeMapper;

    /**
     * 查询股票通知消息
     * 
     * @param id 股票通知消息ID
     * @return 股票通知消息
     */
    @Override
    public YfStockNotice selectYfStockNoticeById(Long id)
    {
        return yfStockNoticeMapper.selectYfStockNoticeById(id);
    }

    /**
     * 查询股票通知消息列表
     * 
     * @param yfStockNotice 股票通知消息
     * @return 股票通知消息
     */
    @Override
    public List<YfStockNotice> selectYfStockNoticeList(YfStockNotice yfStockNotice)
    {
        return yfStockNoticeMapper.selectYfStockNoticeList(yfStockNotice);
    }

    /**
     * 新增股票通知消息
     * 
     * @param yfStockNotice 股票通知消息
     * @return 结果
     */
    @Override
    public int insertYfStockNotice(YfStockNotice yfStockNotice)
    {
        yfStockNotice.setCreateTime(DateUtils.getNowDate());
        return yfStockNoticeMapper.insertYfStockNotice(yfStockNotice);
    }

    /**
     * 修改股票通知消息
     * 
     * @param yfStockNotice 股票通知消息
     * @return 结果
     */
    @Override
    public int updateYfStockNotice(YfStockNotice yfStockNotice)
    {
        return yfStockNoticeMapper.updateYfStockNotice(yfStockNotice);
    }

    /**
     * 批量删除股票通知消息
     * 
     * @param ids 需要删除的股票通知消息ID
     * @return 结果
     */
    @Override
    public int deleteYfStockNoticeByIds(Long[] ids)
    {
        return yfStockNoticeMapper.deleteYfStockNoticeByIds(ids);
    }

    /**
     * 删除股票通知消息信息
     * 
     * @param id 股票通知消息ID
     * @return 结果
     */
    @Override
    public int deleteYfStockNoticeById(Long id)
    {
        return yfStockNoticeMapper.deleteYfStockNoticeById(id);
    }
}
